package com.netas.kekmanager.dao;

import com.netas.kekmanager.dao.model.Feedback;
import com.netas.kekmanager.dao.model.FeedbackPk;
import com.netas.kekmanager.dao.exceptions.FeedbackDaoException;
import java.util.Date;
import java.util.List;

public interface FeedbackDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return FeedbackPk
	 */
	public FeedbackPk insert(Feedback dto);

	/** 
	 * Updates a single row in the feedback table.
	 */
	public void update(FeedbackPk pk, Feedback dto) throws FeedbackDaoException;

	/** 
	 * Deletes a single row in the feedback table.
	 */
	public void delete(FeedbackPk pk) throws FeedbackDaoException;

	/** 
	 * Returns all rows from the feedback table that match the criteria 'id = :id'.
	 */
	public Feedback findByPrimaryKey(int id) throws FeedbackDaoException;

	/** 
	 * Returns all rows from the feedback table that match the criteria ''.
	 */
	public List<Feedback> findAll() throws FeedbackDaoException;

	/** 
	 * Returns all rows from the feedback table that match the criteria 'userID = :userID'.
	 */
	public List<Feedback> findByUser(int userID) throws FeedbackDaoException;

	/** 
	 * Returns all rows from the feedback table that match the criteria 'id = :id'.
	 */
	public List<Feedback> findWhereIdEquals(int id) throws FeedbackDaoException;

	/** 
	 * Returns all rows from the feedback table that match the criteria 'userID = :userID'.
	 */
	public List<Feedback> findWhereUserIDEquals(int userID) throws FeedbackDaoException;

	/** 
	 * Returns all rows from the feedback table that match the criteria 'text = :text'.
	 */
	public List<Feedback> findWhereTextEquals(String text) throws FeedbackDaoException;

	/** 
	 * Returns all rows from the feedback table that match the criteria 'date = :date'.
	 */
	public List<Feedback> findWhereDateEquals(Date date) throws FeedbackDaoException;

	/** 
	 * Returns all rows from the feedback table that match the criteria 'processed = :processed'.
	 */
	public List<Feedback> findWhereProcessedEquals(int processed) throws FeedbackDaoException;

	/** 
	 * Returns the rows from the feedback table that matches the specified primary-key value.
	 */
	public Feedback findByPrimaryKey(FeedbackPk pk) throws FeedbackDaoException;

}
